CREATE EXTERNAL TABLE IF NOT EXISTS spmi_ods.spmi_phone_global_bill(
id                                                 bigint                         COMMENT 'ID',
sn                                                 String                         COMMENT '话单序列号',
bill_generation_time                               timestamp                      COMMENT '账单产生时间',
bill_generation_date                               String                         COMMENT '账单产生日期',
create_time                                        timestamp                      COMMENT 'CURRENT_TIMESTAMP',
update_time                                        timestamp                      COMMENT 'CURRENT_TIMESTAMP'
)
COMMENT '全局索引表'
PARTITIONED BY (dt STRING COMMENT '更新/创建日期 (yyyy-MM-dd)')
STORED AS PARQUET
LOCATION '/dw/hive/spmi_ods.db/external/spmi_phone_global_bill'
TBLPROPERTIES (
  'parquet.column.index.access'='true'
)